-- GENERATED SPELL FOR [Bloodwarder Protector] --


function spell0_17993(pUnit, Event) --@Crystal Strike,n/a--
pUnit:FullCastSpellOnTarget(29765,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17993', 586, 1)
end

function spell1_17993(pUnit, Event) --@Intervene,n/a--
pUnit:FullCastSpellOnTarget(34784,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17993', 10000, 1)
end

function spell2_17993(pUnit, Event) --@Spell Reflection,Self--
pUnit:FullCastSpellOnTarget(35399,pUnit)
pUnit:RegisterEvent('Sorts_17993', 8273, 1)
end

function Sorts_17993(pUnit, Event)
local choix_sorts_17993 = math.random(0, 2)
if choix_sorts_17993 == 0 then
pUnit:RegisterEvent('spell0_17993', 1, 1)
end
if choix_sorts_17993 == 1 then
pUnit:RegisterEvent('spell1_17993', 1, 1)
end
if choix_sorts_17993 == 2 then
pUnit:RegisterEvent('spell2_17993', 1, 1)
end
end

function mob17993_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17993', math.random(1500, 3000), 1)
end

function mob17993_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17993_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17993_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17993, 1, 'mob17993_Action')
RegisterUnitEvent(17993, 2, 'mob17993_Leave')
RegisterUnitEvent(17993, 3, 'mob17993_Kill')
RegisterUnitEvent(17993, 4, 'mob17993_Die')
